IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[$TableName]') AND type in (N'U'))
DROP TABLE [$TableName]